import 'package:bruno/bruno.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../../AppConfig/Config.dart';
import '../../l10n/messages.dart';

class OilDetails extends StatefulWidget {
  const OilDetails({super.key});

  @override
  State<OilDetails> createState() => _OilDetailsState();
}

class _OilDetailsState extends State<OilDetails> {
  @override
  Widget build(BuildContext context) {
    var messages = AppLocalizations.of(context)!;
    final screenSize = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: MyColors.backgreyColor,
      appBar: AppBar(
        backgroundColor: Colors.white,
        centerTitle: true,
        title: Text("油站详情",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w300),),
      ),
      body: Column(
        children: [
      Expanded(child:  ListView(
        children: [
          SizedBox(height: 8.h,),
          Container(
            padding: EdgeInsets.only(left: 20.w,right: 20.w,top: 15.h,bottom: 15.h),
            color: Colors.white,
            child: Column(
              children: [
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text("中国石油保圣加油站",style: TextStyle(color: Colors.black,fontSize: 16.sp,fontWeight: FontWeight.w600),),
                        SizedBox(height: 4.h,),
                        Text("(S343)阳城镇机场路1号",style: TextStyle(color:MyColors.textColor,fontSize: 13.sp,),),
                        SizedBox(height: 4.h,),
                        Text("16.6"+"Km",style: TextStyle(color: Colors.black,fontSize: 16.sp,fontWeight: FontWeight.w600),),
                      ],
                    ),
                    Image.asset("lib/Images/PersonCenter/加油站示例图片.png",width: 50.w,height: 50.h,),

                  ],
                ),
                SizedBox(height: 10.h,),
                Row(
                  crossAxisAlignment: CrossAxisAlignment.end,
                  children: [
                    Text("油价¥",style: TextStyle(color: Colors.black),),
                    Text("6.96",style: TextStyle(color: MyColors.themeColor,fontSize: 26.sp,fontWeight: FontWeight.w600),)
                  ],
                )
              ],
            ),
          ),
          SizedBox(height: 8.h,),
          Container(
            color: Colors.white,
            padding: EdgeInsets.only(top: 15.h,left: 20.w,right: 10.w,bottom: 10.h),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text("油站详情",style: TextStyle(color: Colors.black,fontSize: 16.sp,fontWeight: FontWeight.w600),),
                SizedBox(height: 8.h,),
                Image.asset("lib/Images/PersonCenter/加油站示例图片.png",height: 100.h,),
                SizedBox(height: 20.h,),
                GestureDetector(
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Row(

                        children: [
                          Image.asset("lib/Images/PersonCenter/加油站icon.png",width: 20.w,height: 20.h,),
                          SizedBox(width: 8.w,),
                          BrnTagCustom.buildBorderTag(
                            tagText: '24小时营业',
                            textColor: MyColors.textColor,
                            borderColor: MyColors.hintColor,
                            borderWidth: 1.w,
                            fontSize: 10,
                          ),
                          SizedBox(width: 2.w,),
                          BrnTagCustom.buildBorderTag(
                            tagText: '车长限制30米',
                            textColor: MyColors.textColor,
                            borderColor: MyColors.hintColor,
                            borderWidth: 1.w,
                            fontSize: 10,
                          ),
                          SizedBox(width: 2.w,),
                          BrnTagCustom.buildBorderTag(
                            tagText: '支持运费油卡',
                            textColor: MyColors.textColor,
                            borderColor: MyColors.hintColor,
                            borderWidth: 1.w,
                            fontSize: 10,
                          ),
                          SizedBox(width: 2.w,),
                          BrnTagCustom.buildBorderTag(
                            tagText: '加水服务',
                            textColor: MyColors.textColor,
                            borderColor: MyColors.hintColor,
                            borderWidth: 1.w,
                            fontSize: 10,
                          ),
                        ],
                      ),
                      Icon(Icons.arrow_forward_ios,color: MyColors.hintColor,size: 15,),
                    ],
                  ) ,
                  onTap: (){

                  },
                ),
                SizedBox(height: 10.h,),
                Container(height: 1.h,color: MyColors.backgreyColor,),
                SizedBox(height: 10.h,),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Row(
                      children: [
                        Image.asset("lib/Images/PersonCenter/油站资质icon.png",width: 20.w,height: 20.h,),
                        SizedBox(width: 10.w,),
                        Text("油站资质",style: TextStyle(color: Colors.black),),
                      ],
                    ),
                    Icon(Icons.arrow_forward_ios,color: MyColors.hintColor,size: 15,),
                  ],
                ),
                SizedBox(height: 10.h,),
                Container(height: 1.h,color: MyColors.backgreyColor,),
                SizedBox(height: 10.h,),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Row(
                      children: [
                        Image.asset("lib/Images/PersonCenter/油站举报icon.png",width: 20.w,height: 20.h,),
                        SizedBox(width: 10.w,),
                        Text("举报",style: TextStyle(color: Colors.black),),
                      ],
                    ),
                    Icon(Icons.arrow_forward_ios,color: MyColors.hintColor,size: 15,),
                  ],
                ),
                SizedBox(height: 10.h,),
                Container(height: 1.h,color: MyColors.backgreyColor,),
                SizedBox(height: 10.h,),
                SizedBox(height: 10.h,),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Row(
                      children: [
                        Image.asset("lib/Images/PersonCenter/油站司机印象icon.png",width: 20.w,height: 20.h,),
                        SizedBox(width: 10.w,),
                        Text("司机印象",style: TextStyle(color: Colors.black),),
                        SizedBox(width: 4.w,),
                        BrnTagCustom.buildBorderTag(
                          tagText: '加油不排队',
                          textColor: MyColors.textColor,
                          borderColor: Colors.white,
                          backgroundColor: MyColors.backgreyColor,
                          fontSize: 12,
                        ),
                        BrnTagCustom.buildBorderTag(
                          tagText: '位置方便',
                          textColor: MyColors.textColor,
                          borderColor: Colors.white,
                          backgroundColor: MyColors.backgreyColor,
                          fontSize: 12,
                        ),
                        BrnTagCustom.buildBorderTag(
                          tagText: '加油员亲切热情',
                          textColor: MyColors.textColor,
                          borderColor: Colors.white,
                          backgroundColor: MyColors.backgreyColor,
                          fontSize: 12,
                        ),
                      ],
                    ),
                    Icon(Icons.arrow_forward_ios,color: MyColors.hintColor,size: 15,),
                  ],
                ),
              ],
            ),
          ),
        ],
      ),
      ),
          Container(
            height: 90.h,
            width: screenSize.width,
            color: Colors.white,
            child:Container(
              margin: EdgeInsets.only(top: 10.h,bottom: 45.h,left: 15.w,right: 15.w),
              child:  BrnSmallMainButton(
                title: '去加油',
                bgColor: MyColors.themeColor,
                fontSize: 16.sp,
                radius: 30,
                onTap: () {

                },
              ),
            ),

          )
      ]
      ),

    );
  }
}
